The CABAC (Context-based Adaptive Binary Arithmetic Coding) is one of the two entropy-coding schemes adopted in the international video coding standard H. 264. Compared with the other entropy-coding scheme CAVLC (Context-based Adaptive Variable Length Coding), the CABAC has a higher compressing efficiency but is also more complicated in implementation.
The function of the entropy-coder is to code the values of all the syntax elements in each macro-block (MB) into the code stream (also referred to as “bit stream”) successively according to the MB scan order. MB is a basic unit block in the video image coding and each image is divided into MBs and then coded.
The CABAC arithmetic decoding is based on the principle of space recursion partition. When decoding the current bin, the probability of the current bin being 0 or 1 is required to know, which is represented by p and is decided by the content probability model corresponding to the current bin. The more probable symbol (MPS) and the less probable symbol (LPS) should be firstly differentiated and they correspond to 0 or 1 respectively. The value of LPS (valLPS) and the value of MPS (valMPS) are represented by 0 and 1 and applied in the content probability model corresponding to the decoding of the current bin. If the value of MPS corresponding to the current bin is represented by p(0), the value of LPS is represented by p(1)=1−p(0).
The space range of the dualized probability is (0, 1) and the whole space is determined by the value of codIRange. The range of the subinterval is calculated by the probability value p corresponding to the decoding of the current bin such that the range of the MPS space corresponds to p(0)*codIRange and the range of the LPS space corresponds to codIRange−p(0)*codIRange. After the probability space is determined, within which subinterval the probability value corresponding to the decoding of the current bin is can be determined according to the value of codIOffset. If the probability is within the LPS space, the value corresponding to the decoding of the current bin corresponds to the valLPS; and if the probability is within the MPS space, the value corresponding to the decoding of the current bin corresponds to the valMPS. If the probability is within the MPS space, the value of the MPS space p(0)*codIRange is considered as the whole probability space codIRange when decoding the next bin so as to continually partition the space and perform decoding. The above is only a brief illustration of the CABAC decoding, and as to the detailed illustration of the CABAC decoding, please refer to H. 264 protocol, which is cited here for reference and will not be illustrated in detail.
For example, in the maintenance of the content probability model, the probability evaluation is accomplished through a group of Finite State Machines, which are based on a probability state table covering 64 different probability events. The probability state table is represented by {pLPS(pStateIdx)|0<=pStateIdx<64}.
Each value in the table corresponds to a LPS value pLPS. The table is organized according to the principle that with the increase of the pStateIdx value, the LPS value decreases and when pStateIdx=0, the corresponding LPS value is 0.5.
The CABAC algorithm was instituted and proposed on the JVT (the joint group of MPEG of ITU-T international video organization ISO) conference in 2003. Since the CABAC algorithm has developed a comparatively short period of time, proposed structures for realizing an integrated decoding are quite few, especially the high speed and high throughput real-time decoding processor.
The known CABAC hardware-decoding units mainly have the architecture of software decoding and the combination of the software decoding and the hardware decoding.
The CABAC software/hardware-decoding units can refer to the jm95 software provided by JVT. The software decoding performs the decoding procedure on the PC according to the algorithm flow and the software is responsible for all the CABAC decoding tasks. However, the decoding speed is slow and the need of real-time applications cannot be satisfied.
“Arithmetic coding architecture for H.264/AVC CABAC compression system”, Digital System Design, 2004. DSD 2004. Euromicro Symposium on, 31 Aug.-3 Sep. 2004 Page 62-69 by Osorio, R. R.; Bruguera, J. D. provides a hardware-decoding unit architecture with the combination of the software and the hardware, which adopts the hardware speedup mode. The decoding for the coefficient syntax element, which occupies the most workload is realized by the hardware speedup architecture, and the decoding for other syntax elements such as the mb_type, sub_mb_type, CBP (Coded Block Patterns), dquant, brightness predicting mode, chroma predicting mode, MVD (Motion Vector Data) and reference frame index etc., are all realized by the software. Such kind of decoding architecture has a higher efficiency than the software-hardware combined decoding unit. However in the decoding architecture, the hardware only performs the decoding for one kind of syntax element in the macro block, i.e. the decoding for the coefficient, while the software performs the decoding for other syntax elements; and the interaction between the hardware and the software not only relates to the border macro block information but also relates to the continuous interaction in the software and hardware decoding procedure for the Range and Offset variables generated during the CABAC decoding process, which may lead to the unclear function designation of the software and the hardware, to the complex interaction procedure and to the low efficiency.
Moreover, in the decoding architecture, the software is responsible for the decoding for all the syntax elements except the coefficient and the hardware is only responsible for the decoding for the coefficient, which may result in the resource waste to some extent.
In brief, in the prior art, the software performs the decoding for all or the majority of syntax elements in the macro block, which may lead to the low efficiency of CABAC decoding and complex realization and cannot satisfy the requirements for the video processing speed and the data processing capacity of the real-time and high definition applications.
In brief, in the prior art, the software performs the decoding for all or the majority of syntax elements in the macro block, which may lead to the low efficiency of CABAC decoding and complex realization and cannot satisfy the requirements for the video processing speed and the data processing capacity of the real-time and high definition applications.